<?php
/**
 * Created by PhpStorm.
 * User: zhouxin
 * Date: 2018/10/7
 * Time: 13:01
 */

include "config.php";

$pid=isset($_REQUEST["user_id"])?$_REQUEST["user_id"]:"";
if($pid != ""){
    $sqlSelect="SELECT pro_id,pro_num,pro_price,pro_name,pro_imgPath FROM cart WHERE user_id=$pid;";
//    $result = mysqli_query($conn, $sqlSelect);
//    $row = mysqli_fetch_assoc($result);
    if ($res=mysqli_query($conn,$sqlSelect)){
        while($row=mysqli_fetch_array($res)) $result[]=$row;
//        mysql_free_resule($res);
    }
    print_r(json_encode($result));
}
